#include "mainwindow.h"
#include <QApplication>
#include <iostream>
#include <thread>

using namespace std;

class MyClass
{
public:
    void hello()
    {
        std::cout << "current thread id: " <<
                     std::this_thread::get_id() << "\n";
        std::cout << "Hello Concurrent World\n";
    }

    static void helloPara(int i = 0)
    {
        std::cout << "current thread id: " <<
                     std::this_thread::get_id() << "\n";
        std::cout << i << "\n";
    }
};

QString fai25x = "FAI25-D-X-distance";
QString fai25y = "FAI25-D-Y-distance";
QString fai25p = "FAI25-D-position";


int main(int argc, char *argv[])
{
    MyClass myClass;
    int data = 10;
    std::thread t(&MyClass::hello, myClass);
    std::thread t1(MyClass::helloPara, 100);
    t.join();
    t1.join();
//    int startIndex = fai25x.indexOf("-distance");
//    QString fai25X = fai25x.mid(0, startIndex);
//    int startIndexY = fai25y.indexOf("-distance");
//    QString fai25Y = fai25y.mid(0, startIndexY);
//    int startIndexP = fai25p.indexOf("-distance");
//    QString fai25P = fai25p.mid(0, startIndexP);
//    int a = 0;
}

